package com.seveneight.baijiesteward.ui.first.presenter;

import com.seveneight.baijiesteward.bean.VersionBean;
import com.seveneight.baijiesteward.http.MyCallBack;
import com.seveneight.baijiesteward.ui.first.contract.VersionUpdateContract;
import com.seveneight.baijiesteward.ui.first.model.VersionUpdateModel;

/**
 * Created by user1 on 2018/3/31.
 */

public class VersionUpdatePresenter implements VersionUpdateContract.VersionUpdatePresenter {

    VersionUpdateContract.VersionUpdateView versionUpdateView;
    VersionUpdateContract.VersionUpdateModel versionUpdateModel;

    public VersionUpdatePresenter(VersionUpdateContract.VersionUpdateView versionUpdateView) {
        this.versionUpdateView = versionUpdateView;
        versionUpdateModel = new VersionUpdateModel();

    }

    @Override
    public void getVersionInfo() {
        versionUpdateModel.getVersionInfo(new MyCallBack<VersionBean>() {
            @Override
            public void onSuccess(VersionBean versionBean) {
                versionUpdateView.rebackVersionInfo(versionBean);
            }

            @Override
            public void onFailed() {

            }
        });
    }
}
